package com.haha.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class HahaBaseAdapter<T> extends BaseAdapter {
	protected final LayoutInflater inflater;
	protected  Context contex;
	protected List<T> list;
	public HahaBaseAdapter(Context context,List<T> list) {
			this.contex=context;
		    inflater = LayoutInflater.from(context);
		    this.list=list;
	}
	

	public List<T> getList() {
		return list;
	}


	public void setList(List<T> list) {
		this.list = list;
	}


	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public T getItem(int arg0) {
		return list.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}
}
